<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户登录</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="<%=request.getContextPath() %>/user/style/login.css">
<%
	String pubModulusStr = (String) request.getAttribute("pubModulusStr");
	String pubExponentStr = (String) request.getAttribute("pubExponentStr");
	String authorizationStr = (String) request.getAttribute("authorizationStr");
	String userName = (String) request.getAttribute("userName");
	String userPwd = (String) request.getAttribute("userPwd");
%>
</head>
<body>
</body>
</html>
<script type="text/javascript" src="<%=request.getContextPath() %>/bootstrap/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/md5util.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/base64.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/ec.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/jsbn.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/md5util.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/prng4.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/rng.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/rsa.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/sec.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/sha1.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/user/js/security.js"></script>
<script>
	window.onload = function() {
		
		var pubModulusStr = "<%=pubModulusStr%>";
		var pubExponentStr = "<%=pubExponentStr%>";
		var authorizationStr = "<%=authorizationStr%>";
		var userName = "<%=userName%>";
		var userPwd = "<%=userPwd%>";
		var userInfo = {
	        "userName": userName,
	        "userPwd": userPwd,
	        "test" : "laofeiliu",
	        "test2" : "laofeiliu"
	    };
		
		var userInfo2 = {
	        "userName": "djsaof",
	        "userPwd": "djsao",
	        "test" : "laofeiliu",
	        "test2" : "laofeiliu"
	    };
		
		<%-- 
		$.ajax({
            url: "<%=request.getContextPath() %>" + '/list.action',
            dataType: 'json',
            headers: {"Authorization": authorizationStr},
            data: {
                "secEncryptMsg": encReqData(userInfo, pubModulusStr, pubExponentStr),
                "secSignMsg": md5SignMsg(userInfo, authorizationStr)
            },
            type: 'post',
            success: function (data) {
            
            }
		});
		 --%>
		
		$.ajax({
            url: "<%=request.getContextPath() %>" + '/list.action',
            dataType: 'json',
            headers: {"Authorization": authorizationStr},
            data: {
                "secEncryptMsg": encReqData(userInfo2, pubModulusStr, pubExponentStr),
                "secSignMsg": md5SignMsg(userInfo2, authorizationStr)
            },
            type: 'post',
            success: function (data) {
            
            }
		});
	}
</script>